package com.biwin.core.main.property;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * BiWin Framework System Properties
 *
 * @author biwin
 * @since 0.0.1
 */
@ConfigurationProperties(prefix = "biwin")
public class BiWinProperties {

    /**
     * 默认的开发者账户
     */
    private String devAccount = "developer";

    /**
     * 是否是开发模式
     */
    private Boolean debug = false;

    /**
     * 默认的工作台的路径
     */
    private String adminPath = "/biwin";

    public String getDevAccount() {
        return devAccount;
    }

    public void setDevAccount(String devAccount) {
        this.devAccount = devAccount;
    }

    public String getAdminPath() {
        return adminPath;
    }

    public void setAdminPath(String adminPath) {
        if (!adminPath.startsWith("/")) {
            adminPath = "/" + adminPath;
        } else {
            adminPath = adminPath.replaceFirst("[/]+", "/");
        }
        this.adminPath = adminPath;
    }

    public Boolean getDebug() {
        return debug;
    }

    public void setDebug(Boolean debug) {
        this.debug = debug;
    }

}
